﻿using Common.Contract.Paging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Contract
{
    /// <summary>
    /// Nomal response record
    /// </summary>
    public interface IResponseRecord
    {
        bool IsSuccess { get; set; }
        string ErrorMessage { get; set; }
    }

    /// <summary>
    /// Search response record
    /// </summary>
    public interface ISearchResponseRecord<T> : IResponseRecord where T : class
    {
        PageRecord Page { get; set; }
        List<T> Records { get; set; }
    }

    /// <summary>
    /// Get response record
    /// </summary>
    public interface IRetrieveResponseRecord<T> : IResponseRecord where T : class
    {
        T Record { get; set; }
    }
}
